<?php

namespace console\controllers;

use Yii;
use common\models\Catelog;
use common\models\Note;
use common\models\Subject;
use common\models\Post;
use common\models\Sltopic;
use common\models\Shicai;
use common\models\Zytopic;
use common\models\Zhongyao;
use zhelyabuzhsky\sitemap;
use yii\console\Controller;
use yii\filters\VerbFilter;

/**
 * CatelogController implements the CRUD actions for Catelog model.
 */
class SitemapController extends Controller {

    /**
     * @inheritdoc
     */
//    public function behaviors() {
//        return [
//            'verbs' => [
//                'class' => VerbFilter::className(),
//                'actions' => [
//                    'delete' => ['POST'],
//                ],
//            ],
//        ];
//    }
    
    public function actionIndex() {
        echo \Yii::$app->id;
        echo "\n";
        var_dump(\Yii::$app->modules['sitemap']);
    }

//    public function actionCreateSitemap() {
    public function actionCreate() {
//        echo Yii::$app->id;
        echo Yii::$app->sitemap;
//        \Yii::$app->sitemap
//                ->addModel(Catelog::className())
//                ->addModel(Subject::className())
//                ->addModel(Sltopic::className())
//                ->addModel(Zytopic::className())
//                ->addModel(Shicai::className())
//                ->addModel(Zhongyao::className())
//                ->addModel(Note::className())
//                ->addModel(Post::className())
//                ->setDisallowUrls([
////                    '#url1#',
////                    '#url2$#',
//                ])
//                ->create();
    }

}
